package org.potiorb.demo.generated;


import org.potiorb.orb.giop.GIOPMessageReply;
import org.potiorb.orb.giop.GIOPMessageRequest;
import org.potiorb.orb.marshal.CallData;
import org.potiorb.orb.portable.ObjectImpl;
import org.potiorb.orb.portable.ObjectRef;

import org.potiorb.orb.marshal.*;
import org.potiorb.orb.ORB;
import org.potiorb.orb.ORBImpl;
import org.potiorb.orb.invoke.Invoker;

/**
 *	Generated from IDL definition of interface "Teste"
 *	@author JacORB IDL compiler
 */


public class _TesteStub extends ObjectImpl implements Teste
{
	private String[] ids = {"IDL:Teste:1.0","IDL:omg.org/CORBA/Object:1.0"};
	public String[] _ids()
	{
		return ids;
	}

	public final static java.lang.Class _opsClass = TesteOperations.class;
	public void simples_hello(java.lang.String texto)
	{
		ObjectRef _ref = (ObjectRef)this._get_delegate();

		ParamData _paramslist[] = new ParamData[1];
		ParamData _param = new ParamData();
		_param.setParamMode(new ParamMode(ParamMode._pm_IN));
		_param.setTypeCode(new TypeCodeImpl(TCKind.tk_string));
		_paramslist[0] =_param;

		CallData _call = new CallData();
		_call.setMethodName("simples_hello");
		_call.setNoOfParameters(1);
		_call.setParamerers(_paramslist);

		Any _value_param = new Any();
		_value_param.insert_string(texto);
                ORBImpl _orb = _ref.getOrb();
                Marshaler mar =  _orb.getMarshaler();
		GIOPMessageRequest message = mar.MarshalInvocationRequest(_ref,_call, _value_param);
                Invoker inv = _orb.getInvoker();
                GIOPMessageReply _replymsg = inv.Invoke(message,_ref);
		_ref.getOrb().getMarshaler().UnmarshalInvocationReply(_replymsg);
	}
}
